Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge master into feature/stepfunctions-workflow #5695

Conversation

aws-toolkit-automation
Copy link
Collaborator

Automatic merge failed

  • Resolve conflicts and push to this PR branch.
  • Do not squash-merge this PR. Use the "Create a merge commit" option to do a regular merge.

Command line hint

To perform the merge from the command line, you could do something like the following (where "origin" is the name of the remote in your local git repo):

git stash
git fetch --all
git checkout origin/feature/stepfunctions-workflow
git merge origin/master
git commit
git push origin HEAD:refs/heads/autoMerge/feature/stepfunctions-workflow

keeganirby and others added 25 commits November 20, 2024 08:59
#6047)

## Problem
Cloudwatch wants to monitor usage metrics of the LiveTail integration

## Solution
When starting a session emit telemetry for: 
* Session already started (this case happens when session is already
running, and customer sends a new command that matches the already
running session)
* Has LogEventFilter
* LogStream filter type
* Source of the command (command palette, explorer)

When closing a session: 
* Session duration
* source of cancellation (ex: CodeLens, ClosingEditors)

---

<!--- REMINDER: Ensure that your PR meets the guidelines in
CONTRIBUTING.md -->

License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.

---------

Co-authored-by: Keegan Irby <[email protected]>
## Problem
- telemetry fields are not sorted and hard to compare

## Solution
- sort alphabetically

---

<!--- REMINDER: Ensure that your PR meets the guidelines in
CONTRIBUTING.md -->

License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.
adding functionality for selective transformation to allow for java 17
as source and display multiple diff patches for the user to
accept/reject
## Problem
running `npm run compile` always gives you a toolkit package.json change
because the icons are out of sync

## Solution
commit the updated toolkit icons

---

<!--- REMINDER: Ensure that your PR meets the guidelines in
CONTRIBUTING.md -->

License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.
## Problem

The `sync.ts` are huge consisting of many helper functions that being
reused for deploy and build.

## Solution
- split shared methods into separate files for easier testing and
maintenance
- split sync.test.ts file into smaller file
- consolidate `paramsSourcePrompter` for both sync and deploy to avoid
duplicate code
- update PrompterTester helper class to clean up VS Code UI element for
early exit from consumer callback
- rename paramsSource prompter title 

---

License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.

---------

Co-authored-by: Roger Zhang <[email protected]>
#6055)

## Problem

Our backend is expecting the language name (`java` or `sql`) to be
lowercase, not uppercase. Also, the failure reason returned by one of
our APIs was being overwritten and not shown to users.


## Solution

User lowercase, and prevent overwriting.
- Simplify when to focus the notifications panel for emergency notifications.
- Try to limit race conditions when dismissing notifications.
## Problem
If customers open a workspace without a workspace folder they get:
```
2024-11-19 10:49:16.189 [error] Error: No workspace folders found
	at k (/Users/myuser/.vscode/extensions/amazonwebservices.amazon-q-vscode-99.0.0-g3afd54d/dist/src/extensionNode.js:5464:5562)
	at L.buildIndex (/Users/myuser/.vscode/extensions/amazonwebservices.amazon-q-vscode-99.0.0-g3afd54d/dist/src/extensionNode.js:5464:9890)
	at Immediate.<anonymous> (/Users/myuser/.vscode/extensions/amazonwebservices.amazon-q-vscode-99.0.0-g3afd54d/dist/src/extensionNode.js:5464:11854)
```

because workspace indexing is throwing an error

## Solution
Log that no workspace folders were found so indexing is skipped
## Problem
Update dependencies to avoid any vulnerabilities 

## Solution
fix(notifications): extension activation hangs if fetch fails
…ing session (#6063)

## Problem
Currently after closing a session in a way that leaves the TextDocument
open (`Stop tailing` CodeLens), the codeLenses remain visible. This
means a user could click `Stop tailing` again, and receive an error for
not being able to find the running LiveTail session for the given
document.

Additionally, there is no feedback when a session is closed. Clicking
`Stop tailing` doesn't signal to the user that the session was actually
stopped.

## Solution
* Provide a `refresh` method in the LiveTail CodeLens provider. This
fires an event to force recomputing the CodeLenses on a document.
* Modify LiveTail Lens provider to return no Lenses if the session is
not running (in the registry)
* Display an information window when a Session is stopped
* Changes wording/placement on some log statements for consistency.
- Removes feature flag
- Slightly adjusts toolkit_invokeAction telemetry to not use button
string, instead we use action enums.

---

<!--- REMINDER: Ensure that your PR meets the guidelines in
CONTRIBUTING.md -->

License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.
… returns empty (#6053)

## Problem
there are 2 scenarios where we consider "Empty"
1. empty list of suggestion : `[]`
2. non empty list of suggestion with empty content: `['', '']`


Currently, only (2) will have plugins send out `userTriggerDecision`
event whereas (1) doesn't.

## Solution


---

<!--- REMINDER: Ensure that your PR meets the guidelines in
CONTRIBUTING.md -->

License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.
jpinkney-aws and others added 28 commits December 13, 2024 15:15
## Problem
- For the last 8 months or so we've skipped e2e test results, now
they're becoming a lot more crucial and used by other teams

## Solution
- remove the skipping


---

- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).

License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.
…to always use repomap (#6205)

## Problem
Remove client side A/B experiment (control, treatment1, treatment2),
move it to service side and always assume treatment1

## Solution


---

- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).

License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.
… telemetry (#6242)

## Problem
Current `supplementalContextStrategy ` only reflect what group the user
is in, however by doing this it won't help much on our data analysis.
What we need is the context strategy being used so that we know how much
% of users have repomap or opentabs and how % of users have empty
supplemental context etc.

## Solution


---

- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).

License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.
## Problem
`jobId` missing in some metrics.


## Solution
Add it.
## Problem

Apply fix removes other issues in the same file. This is happening
because apply fix command will always replace the entire file contents
which triggers a document change event that intersects with all issues
in the file.


## Solution

Look through the diff hunks and apply them in a range.


---

- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).

License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.
## Problem
Techdebt test is failing CI. This is unlikely to be addressed atm. 

## Solution
- Delay until 2025.
…points #6240

## Problem
SAM CLI guided deploy support template parameter override for both sync
and deploy command. However, the AppBuilder wizard UI only support this
feature for SAM deploy trigger from SAM template context menu or
AppBuilder project node menu button.

## Solution
- Implement nested wizard for template parameter for both sync and
deploy action for all entry points.
- Refactor DeployWizard class for consistency with SyncWizard class
- Add unit test for validating correct backward flow and state
restoration for both wizard.
…r timeout (#6256)

## Problem

related issue: #6079,
#6252

caller
```
function main () {
       // init vscode cancellation token
       const cancellationToken
       setTimeout(100, () => {
              cancellationToken.cancel()
       })

      highlevelWrapperFetchSupplementalContext(editor, cancellationToken)
}

```

```
export function highlevelWrapperFetchSupplementalContext(editor, cancellationToken) {
       const supplementalContext = waitUntil(100, () => {
            // here always timeout and throw TimeoutException
            const opentabs =  await fetchOpenTabsContext(...)
            const projectContext = await fetchProjectContext()

           const result = []
           if (projectContext not empty) {
                    // push project context
           }

           if (opentabs not empty) {}
                   // push openttabs
           })  
          

         return result
}


async function fetchOpenTabsContext(editor, cancellationToken) {
      ....
      // VSC api call
}

async function fetchProjectContext() {
     ....
     // LSP call
}

```



After investigation, it looks like mix use of `vscode.CancellationToken`
and `waitUntil()` will likely cause cancellation token to be cancelled
prematurely (might be because another layer of waitUntil will run the
fetchOpenTabsContext asynchronously thus causing it to timeout
prematurely) therefore `fetchOpebtabsContext(..)` will return null in
this case and hence causing test cases failing.

Therefore, the issue here is actually not the test case itself and
they're failing due to race condition

## Solution
remove usage of cancellation token and only use waitUntil for timeout
purpose








## Functional testing

retrieved sup context as expected





### Case 1: repomap is available (there are local imports)
```
2024-12-16 13:10:15.616 [debug] CodeWhispererSupplementalContext:
    isUtg: false,
    isProcessTimeout: false,
    contentsLength: 14436,
    latency: 16.67179101705551
    strategy: codemap
    Chunk 0:
        Path: q-inline
        Length: 10209
        Score: 0
    Chunk 1:
        Path: /Volumes/workplace/ide/aws-toolkit-vscode-staging/packages/core/src/codewhisperer/service/serviceContainer.ts
        Length: 1486
        Score: 22.60257328587725
    Chunk 2:
        Path: /Volumes/workplace/ide/aws-toolkit-vscode-staging/packages/core/src/codewhisperer/tracker/lineTracker.ts
        Length: 1649
        Score: 19.106700952807103
    Chunk 3:
        Path: /Volumes/workplace/ide/aws-toolkit-vscode-staging/packages/core/src/codewhisperer/tracker/lineTracker.ts
        Length: 1092
        Score: 10.334690655691002
```

### Case 2: No repomap, should fallback to opentabs only

![image](https://github.com/user-attachments/assets/f59c11cf-0e34-40b8-8162-34b4d057673f)

```
2024-12-16 13:11:29.738 [debug] CodeWhispererSupplementalContext:
    isUtg: false,
    isProcessTimeout: false,
    contentsLength: 5046,
    latency: 16.311500012874603
    strategy: opentabs
    Chunk 0:
        Path: /Volumes/workplace/ide/aws-toolkit-vscode-staging/packages/core/src/codewhisperer/tracker/lineTracker.ts
        Length: 1564
        Score: 0
    Chunk 1:
        Path: /Volumes/workplace/ide/aws-toolkit-vscode-staging/packages/core/src/codewhisperer/tracker/lineTracker.ts
        Length: 1649
        Score: 0
    Chunk 2:
        Path: /Volumes/workplace/ide/aws-toolkit-vscode-staging/packages/core/src/codewhisperer/tracker/lineTracker.ts
        Length: 1833
        Score: 0
```





---

- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).

License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.
## Problem
#6225
- Didn't think 400% could be exceeded, but this one is especially
volatile. Sometimes it barely spikes, and sometimes it goes crazy.
## Solution
- Increase to 500%

---

- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).

License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.
… logs (#6263)

## Problem
- JSDOM logs non-critical CSS parsing errors during E2E tests. These
warnings occur when mynah-ui loads SCSS files in
[main.ts](https://github.com/aws/mynah-ui/blob/8058f86ed370f5268ba6e0993b2436dca0e09b30/src/main.ts#L37).
These errors appear the test logs but they do not affect test
functionality or results.


## Solution
- Suppress the errors

---

- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).

License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.
…nd test timeouts #6258

## Problem
ref #6252
Test is using real system clock, it's likely to timeout
due to heavy computation in an undeterministic way.

## Solution
Use fake clock.
## Problem
`RDS_POSTGRESQL` should be spelled as `POSTGRESQL`

## Solution
Fix spelling
## Problem
There is no real reason this needs to be async. It is also now
inconsistent with `isExperimentEnabled`.

## Solution
Make non-async and add logged error if the promise rejects.


## Problem
Currently, the TailLogGroup tests are passing, but emitting noisy errors
in the CI logs:
```
<...>
No LiveTail session found for URI: test-region:test-log-group:all: Error: No LiveTail session found for URI: test-region:test-log-group:all
    at D:\a\aws-toolkit-vscode\aws-toolkit-vscode\packages\core\src\awsService\cloudWatchLogs\commands\tailLogGroup.ts:94:19
    at AsyncLocalStorage.run (node:async_hooks:346:14)
<...>
```

The cause for this, is that the event listener for closing the tailing
session when Editor tabs close in TailLogGroup is not being disposed of.
Disposal happens
[here](https://github.com/aws/aws-toolkit-vscode/blob/master/packages/core/src/awsService/cloudWatchLogs/commands/tailLogGroup.ts#L80).
However, currently the "mock response stream" in the test blocks
indefinitely on an [un-resolvable
promise](https://github.com/aws/aws-toolkit-vscode/blob/master/packages/core/src/test/awsService/cloudWatchLogs/commands/tailLogGroup.test.ts#L67).
So the test ends, and this finally block never triggers.

## Solution
Instead of using an un-resolving promise to keep the mock responseStream
open, use an AbortController. When the tests no longer need the
functionality of the disposables, the test can fire the AbortController.
This causes the stream to exit exceptionally, which triggers the
`finally` block in TailLogGroup and runs disposal.

This stops the event listeners from running after the test is completed,
and has eliminated the noisy logs. I have tested this by running `npm
run test` from the CLI.
## Problem
Customers that experience transient network issues are unable to view
their transformation results when the `GetTransformation` API fails
after the default of 3 retries.

## Solution
Increase retries to 8.
## Problem

S3 upload sometimes fails due to transient issues.

## Solution

Add up to 3 retries.

---

- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).

License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.

---------

Co-authored-by: David Hasani <[email protected]>
## Problem
fix #6213

## Solution
- The important part of this test is that the message comes after being inactive. If the message comes slightly early/late, that is okay. If it doesn't come at all, then we have problems and should fail. 
- Pass test if message comes within a minute of expected.
Problem:
Since 6dcbfc7, the `lint-commits` job runs whenever the PR
*description* is edited, which then re-runs all the other GHA jobs. This
is because it listens to the `edited` event, which triggers whenever the
PR is edited in any way (very noisy).

Solution:
There is no way to avoid rerunning all the CI jobs if they are dependent
on `lint-commits`. Instead, revert 6dcbfc7 and document that
re-opening the PR will force CI to re-run, if needed, after fixing a PR
title.
## Problem
Code block extends beyond margins followed by the rest of the document.

## Solution
Remove css styles
## Problem
- mynah ui 4.21.3 contains a fix needed for tests:
https://github.com/aws/mynah-ui/releases/tag/v4.21.3

## Solution
- update to it. No public facing changes are needed
## Problem
This is a part of the task to implement client side alarms in order to
track success rate for the client.

## Solution
- Emit metric data telemetry on success/failure.
@justinmk3 justinmk3 closed this Dec 19, 2024
@justinmk3 justinmk3 deleted the autoMerge/feature/stepfunctions-workflow branch December 19, 2024 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.